import { defHttp } from '/@/utils/http/axios';

enum Api {
  inventoryTaskList = '/inventoryTask/inventoryTask/queryInventoryTaskByMainId',
  list = '/inventoryTask/inventoryTask/list',
  save = '/inventoryTask/inventoryTask/add',
  edit = '/inventoryTask/inventoryTask/edit',
  upLoadInventoryTask = '/inventoryTask/inventoryTask/upLoad',
}
/**
 * 列表接口
 * @param params
 */
export const list = (params) => defHttp.get({ url: Api.list, params });

export const upLoadInventoryTask = (params) => defHttp.post({ url: Api.upLoadInventoryTask, params });
/**
 * 保存或者更新
 * @param params
 */
export const saveOrUpdate = (params, isUpdate) => {
  const url = isUpdate ? Api.edit : Api.save;
  return defHttp.post({ url: url, params });
};
/**
 * 查询子表数据
 * @param params
 */
export const inventoryTaskList = Api.inventoryTaskList;
